import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)


const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}


const routes = [
  {
    path: '/',
    name: 'home',
    component: () => import(/* webpackChunkName: "about" */ '../views/home/index.vue')
  },
  {
    path: '/releases',
    name: 'releases',
    component: () => import(/* webpackChunkName: "about" */ '../views/releases/index.vue')
  },
  {
    path: '/releases/:id',
    name: 'releasesId',
    component: () => import(/* webpackChunkName: "about" */ '../views/releases/details.vue')
  },
  {
    path: '/sec',
    name: 'sec',
    component: () => import(/* webpackChunkName: "about" */ '../views/sec/index.vue')
  },
  {
    path: '/stock',
    name: 'stock',
    component: () => import(/* webpackChunkName: "about" */ '../views/stock/index.vue')
  },
  {
    path: '/directors',
    name: 'directors',
    component: () => import(/* webpackChunkName: "about" */ '../views/directors/index.vue')
  },
  {
    path: '/governance',
    name: 'governance',
    component: () => import(/* webpackChunkName: "about" */ '../views/governance/index.vue')
  },
  {
    path: '/management',
    name: 'management',
    component: () => import(/* webpackChunkName: "about" */ '../views/management/index.vue')
  },
  {
    path: '/contact',
    name: 'contact',
    component: () => import(/* webpackChunkName: "about" */ '../views/contact/index.vue')
  },
  {
    path: '/faqs',
    name: 'faqs',
    component: () => import(/* webpackChunkName: "about" */ '../views/faqs/index.vue')
  },
  {
    path: '/email',
    name: 'email',
    component: () => import(/* webpackChunkName: "about" */ '../views/email/index.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
